package com.forclass;
interface ISpecs{ public void test();}
abstract class AbstractPrints{}

public class PackageInfoByRefect extends AbstractPrints implements IBook1920,ISpecs{
    public static void main(String[] args) throws Exception {
//        反射不同类等到不同的结果
//        Class<?> clazz = Class.forName("com.forclass.PackageInfoByRefect");
        Class<?> clazz = Class.forName("com.forclass.ProgramBook");

        System.out.println("包名称：" + clazz.getPackageName());
        Class<?> superClazz = clazz.getSuperclass();
        System.out.println("继承父类=" + superClazz.getName());
//        System.out.println("继承父类=" + superClazz.getSuperclass().getName());
        Class<?> inters[] = clazz.getInterfaces();
        for (Class<?> temp:inters) {
            System.out.println("实现的接口" + temp.getName());
        }

    }
    @Override
    public void read() {

    }

    @Override
    public void test() {

    }
}
